/**
* @Title: ModuleServiceImp.java   
* @Copyright 2010 -2013 CreativeWise
* @Package com.cwises.service.system.module   
* @Description: 模块管理  
* @author wangxinmin    
* @date 2013-12-23 下午1:16:17   
* @version V1.0 
*/
package com.cwises.service.system.role;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.cwises.dao.system.role.RoleDao;
import com.cwises.entity.system.role.RoleManager;
import com.cwises.entity.system.role.UserRoleManager;
import com.orm.AbstractBaseEntityOperation;
import com.orm.IBaseEntityOperation;

/**
 * @ClassName: ModuleServiceImp
 * @Description: 模块管理
 * @author wangxinmin
 * @date 2013-12-23 下午1:16:17
 *
 */
@Service("roleServiceImp")
@Transactional
public class RoleServiceImp extends AbstractBaseEntityOperation<RoleManager> implements IRoleService{
	
	@Resource(name = "roleDaoImpl")
	private RoleDao dao;
	
	
	/**
	 * 
	* @Title: getRoleByUserId   
	* @Description:    根据用户id获取其角色 
	* @param @param userId
	* @param @return    
	* @return List<RoleManager>      
	* @author wangxinmin
	* @date 2013-12-24 下午1:48:02 
	* @throws
	 */
	public List<RoleManager> getRoleByUserId(String userId){
		return dao.getRoleByUserId(userId);
		
	}
	/**
	 * 
	* @Title: getUserRoleByUserId   
	* @Description:    根据用户id获取其角色id  
	* @param @param userId
	* @param @return    
	* @return List<UserRoleManager>      
	* @author wangxinmin
	* @date 2013-12-24 下午1:49:34 
	* @throws
	 */
	public List<UserRoleManager> getUserRoleByUserId(String userId){
		return dao.getUserRoleByUserId(userId);
		
	}
	/* (non-Javadoc)
	 * @see com.cwises.orm.AbstractBaseEntityOperation#getDao()
	 */
	@Override
	public IBaseEntityOperation<RoleManager> getDao() {
		return dao;
	}
	public boolean updateRoleStatus(RoleManager manager) {
		return dao.updateRoleStatus(manager);
	}
}
